﻿using Dto;
using Model;

namespace Dlpad.Services
{
    public interface ICacheService
    {
        Task<bool> LoadDictTypesToCacheAsync();
        Task<List<SysDictType>> GetDictTypesFromCacheAsync();

        // 缓存操作方法
        Task<List<DictDataResponseDto>> GetDictDataByTypeAsync(string dictType);
        Task ClearDictDataCacheAsync(string dictType = null);
        Task<List<DictTypeResponseDto>> GetAllDictTypesAsync();
        Task ClearAllDictCacheAsync();

        // 基础缓存操作
        Task SetStringAsync(string key, string value, TimeSpan? expiration = null);
        Task<string> GetStringAsync(string key);
        Task RemoveAsync(string key);
    }
}